Remote debugging refers to a debugging policy of using a debugging tool on a computer to debug a program on another computer.
In an existing remote debugging technology, two parties are mainly included: a debugger and a debuggee. A party that debugs by using a debugging tool is referred to as a “debugger”, for example, a client Visual Studio 2010 that runs a debugging tool; and a party that is debugged by using a debugging tool is referred to as a “debuggee”, for example, a server-side MSVSMON in which a debugging tool is run. By means of the remote debugging, a debugger may enter, from a debugging environment of the debugger itself at the first time, an environment in which a debuggee has a problem, track, and position the root of the problem, thereby improving efficiency of discovering a problem and solving the problem by the debugger, so that the remote debugging becomes very popular among software debuggers.
In the existing remote debugging technology, a remote debugging and analysis function based on a local area network (LAN) is implemented by using a third-party debugging tool, and at present, common third-party debugging tools include: Visual Studio and WinDbg on a Windows platform, and GNU Debugger (gdb) on a Linux platform. Both the two tools: Visual Studio and the WinDbg are from Microsoft Corporation, while the gdb is a standard debugging device in a GNU system.
Although all the third-party tools described above provide a remote debugging function, that is, a client of a debugging tool and a server-side program are provided, a connection between a debugger and a debuggee cannot be directly established when the debugger and the debuggee are located in different LANs, because the LANs usually use their own gateways. That is, the remote debugging function of these debugging tools cannot be directly used.